package com.jsle.financial.util;

import java.io.UnsupportedEncodingException;

public class Tools {
    public static String enCodeStr(String str) {
        try {
          return new String(str.getBytes("iso-8859-1"), "UTF-8");
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
            return null;
        }
    }
    
    
    public static String getReturnBooleanJson(String flagStr){
		StringBuffer sb = new StringBuffer();
		sb.append("{").append("\"success\"").append(":");
		if(flagStr.equals("true")){
			sb.append("true");
		}else{
			sb.append("false");
		}
		sb.append("}");
		String json = sb.toString();
		return json;
	}
}
